﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ActionSystem.Camera
{
    public static class CameraUtils
    {
        /// <summary>
        /// 计算角色移动方向
        /// </summary>
        /// <param name="ih"></param>
        /// <param name="iv"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        public static Vector3 GetMoveDirction(float ih,float iv,ICameraInfo info)
        {
            if(info==null)
            {
                return Vector3.zero;
            }
            return (ih * info.GetMoveRight() + iv * info.GetMoveFarwrd()).normalized;
        }
    }
}


